<?php
/**
 * Moduleadmin_Model_Updatemodule
 * update module data
 * @author Adrian Stolarski
 */
class Moduleadmin_Model_Updatemodule implements Moduleadmin_Model_Mainable {
    
    /**
     *
     * @var type $action_handler
     * action handler
     */
    public $action_handler;
    
    public function main(array $variables = null) {
        if(isset($variables['module_id']) 
                && (trim($variables['module_id']) != '') 
                && !is_null($variables['module_id'])
                ){
            //var_dump($variables);
            //die();
            $this->action_handler = new Moduleadmin_Data_Updatemodule;
            $this->action_handler->main($variables);
        }
        else {
            $this->action_handler = new Moduleadmin_Data_Modulelistredirect;
            $this->action_handler->main($variables);
        }
    }

}
